<?php
/**
 * 发票报表视图//franz改--关联到毛利表
 * @author jimmy
 * @date 2015-01-14 11:14:11
 */
namespace Admin\Model;
use Think\Model\ViewModel;

class BillReportViewModel extends ViewModel{
    protected $connection = "ETS_DB_CONFIG";
    Protected $autoCheckFields = false;
	public $viewFields = array(
		'sales_order_bill_ets'=>array('id'=>'pid','bill_type','bill_date','bill_money','bill_money_rmb','customer_name','customer_id','u8_customer_id','u8_customer_name','audit_status','payment_status','valid_status','u8_flag','comment','valid_status','bill_number'=>'p_bill_number','increment_id'=>'order_increment_id','customer_id','customer_name','audit_status','order_currency_code','return_time','u8_bill_number','u8_flag'),
		'sales_order_bill_items_ets'=>array('id','gross_profit','payment_method','is_overseaship','increment_id','customer_orderid','sales_return_id','order_item_id','created_at','dealer','sku','erp_sku','name','qty','price','rmb_price','customer_sku','track_number','platform','clear_cost','cost','handler','bill_number','_on'=>'sales_order_bill_ets.bill_number=sales_order_bill_items_ets.bill_number'),
		'userets'=>array('account','department_id','_on'=>'sales_order_bill_items_ets.dealer=userets.account'),
	);
}